package cn.tedu.spring.lifecycle;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 测试订单类
 */
public class TestOrder {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext
                ("cn.tedu.spring.lifecycle");
        Order order = context.getBean(Order.class);
        order.use();
        context.close();
    }
}
